Skip to content

ci: move lint job to reusable golangci-lint workflow - #38

Open
dwisiswant0 wants to merge 2 commits into
mainfrom
dwisiswant0/ci/move-lint-job-to-reusable-golangci-lint-workflow
Open

dwisiswant0 wants to merge 2 commits into
mainfrom
dwisiswant0/ci/move-lint-job-to-reusable-golangci-lint-workflow

Conversation

@dwisiswant0

@dwisiswant0 dwisiswant0 commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Replace lint-test.yml with a lint job in build-test.yml that calls
golangci-lint.yaml, the reusable workflow in projectdiscovery/workflows.
On pull requests it reports only issues on lines the pull request
changes, so a pull request no longer fails on issues it didn't add, such
as ones a new golangci-lint release starts reporting. Push and manual
runs lint the whole module.

The build job now needs lint and doesn't run when lint fails.

Rename build-test.yml to tests.yml and the workflow from Build Test to
Tests, matching dsl's lint and test workflow. Point the README badge at
tests.yml.

tests.yml now runs only for pull requests and pushes to main that change
a .go or .mod file. Before, every pull request and every push to any
branch ran lint and the build job, so a push to a pull request's branch
ran them twice.

The lint timeout goes from 5m to the workflow's default of 30m.

tests.yml also runs when tests.yml itself changes, so this pull request runs the new lint job.

Closes: #37

Replace lint-test.yml with a lint job in build-test.yml that calls
golangci-lint.yaml, the reusable workflow in projectdiscovery/workflows.
On pull requests it reports only issues on lines the pull request
changes, so a pull request no longer fails on issues it didn't add, such
as ones a new golangci-lint release starts reporting. Push and manual
runs lint the whole module.

The build job now needs lint and doesn't run when lint fails.

Rename build-test.yml to tests.yml and the workflow from Build Test to
Tests, matching dsl's lint and test workflow. Point the README badge at
tests.yml.

tests.yml now runs only for pull requests and pushes to main that change
a .go or .mod file. Before, every pull request and every push to any
branch ran lint and the build job, so a push to a pull request's branch
ran them twice.

The lint timeout goes from 5m to the workflow's default of 30m.

Closes: #37
Signed-off-by: Dwi Siswanto <git@dw1.io>
@dwisiswant0 dwisiswant0 self-assigned this Dec 3, 2026
@dwisiswant0
dwisiswant0 requested a review from Mzack9999 December 3, 2026 02:45
The paths filters matched only Go and module files, so a change
to the workflow itself, including this pull request, never ran
it. Add tests.yml to both lists.

Refs: #37
Signed-off-by: Dwi Siswanto <git@dw1.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move the lint job to the reusable golangci-lint workflow

1 participant